﻿using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace Mathmall.Administration.Migrations
{
    /// <inheritdoc />
    public partial class CategoryTableChange : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AlterColumn<string>(
                name: "ProductUnit",
                table: "Category",
                type: "nvarchar(50)",
                nullable: true,
                comment: "计量单位",
                oldClrType: typeof(string),
                oldType: "char(50)",
                oldNullable: true,
                oldComment: "计量单位");

            migrationBuilder.AlterColumn<string>(
                name: "Name",
                table: "Category",
                type: "nvarchar(50)",
                nullable: true,
                comment: "分类名称",
                oldClrType: typeof(string),
                oldType: "char",
                oldNullable: true,
                oldComment: "分类名称");

            migrationBuilder.AlterColumn<string>(
                name: "Icon",
                table: "Category",
                type: "varchar(255)",
                nullable: true,
                comment: "图标地址",
                oldClrType: typeof(string),
                oldType: "char(255)",
                oldNullable: true,
                oldComment: "图标地址");
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AlterColumn<string>(
                name: "ProductUnit",
                table: "Category",
                type: "char(50)",
                nullable: true,
                comment: "计量单位",
                oldClrType: typeof(string),
                oldType: "nvarchar(50)",
                oldNullable: true,
                oldComment: "计量单位");

            migrationBuilder.AlterColumn<string>(
                name: "Name",
                table: "Category",
                type: "char",
                nullable: true,
                comment: "分类名称",
                oldClrType: typeof(string),
                oldType: "nvarchar(50)",
                oldNullable: true,
                oldComment: "分类名称");

            migrationBuilder.AlterColumn<string>(
                name: "Icon",
                table: "Category",
                type: "char(255)",
                nullable: true,
                comment: "图标地址",
                oldClrType: typeof(string),
                oldType: "varchar(255)",
                oldNullable: true,
                oldComment: "图标地址");
        }
    }
}
